package com.example.demo1.itlianxi06;

public class Equals {
    public Equals() {
    }

    public static void main(String[] args) {
        char[] cha = new char[]{'a', 'b', 'c'};
        String s1 = new String(cha);
        String s2 = new String(cha);
        String s3 = "abc";
        String s4 = "abc";
        System.out.println(s1 == s2);
        System.out.println(s3 == s4);
        System.out.println(s1 == s3);
        System.out.println("---------");
        System.out.println(s1.equals(s2));
        System.out.println(s3.equals(s4));
        System.out.println(s1.equals(s3));
    }
}